home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Essential Home & Business Collection
/
The Essential Home & Business Collection.iso
/
27
/
3
/
5
/
HP22D5.ZIP
/
EXTERN
/
CLICKAT.C
< prev
next >
Wrap
Text File
|
1991-04-16
|
750b
|
48 lines
#include "extern.h"
/*
** This routine fakes a mouse click at a specified location.
**
** To use this handler from HyperPAD:
**
** clickat 10,10;
**
** get the rect of page button 1;
** clickat item 1 of it,item 2 of it;
*/
clickat(int NumArgs,HANDLE hx,HANDLE hy)
{
MSG msg;
SHAREDPTR pShared;
if (NumArgs != 2) return(STOP);
msg.Event = EVENT_LEFTBUTTONUP;
msg.ShiftStatus = 0;
msg.MouseX = htoi(hx);
msg.MouseY = htoi(hy);
msg.Buttons = 1;
msg.KeyWord = 0;
msg.AsciiCode = 0;
msg.ScanCode = 0;
UnGetEvent(&msg);
msg.Event = EVENT_LEFTBUTTONDOWN;
UnGetEvent(&msg);
return(STOP);
}
POOL pascal Pool[] = {
{ "clickat",
clickat,
0,
HANDLER},
{ NULL,
NULL,
0,
0} };